﻿@model CurriculaAPI.ViewModelDTO.SpecialistAddDTO

@{
    ViewBag.Title = "Add";
}

<h2>添加专家信息</h2>


@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
<div class="form-horizontal">
    <hr />
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    <div class="form-group">
        @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Sex, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.RadioButtonFor(model => model.Sex, 1, new { @checked = true })男
            @Html.RadioButtonFor(model => model.Sex, 2)女
            @Html.ValidationMessageFor(model => model.Sex, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.CategoryName, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.DropDownListFor(model => model.CategoryName, ViewBag.CategoryNameList as IEnumerable<SelectListItem>, "--请选择--", new { @class = "form-control" })
            @Html.ValidationMessageFor(model => model.CategoryName, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.CourseName, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.DropDownListFor(model => model.CourseName, ViewBag.CourseNameList as IEnumerable<SelectListItem>, "--请选择--", new { @class = "form-control" })
            @Html.ValidationMessageFor(model => model.CourseName, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.TitleName, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.DropDownListFor(model => model.TitleName, ViewBag.TitleNameList as IEnumerable<SelectListItem>, "--请选择--", new { @class = "form-control" })
            @Html.ValidationMessageFor(model => model.TitleName, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.CreateDateTime, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.CreateDateTime, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.CreateDateTime, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="添加" class="btn btn-default" />
            <a style="color:red;">@ViewBag.msg</a>
        </div>
    </div>
</div>
}

<div>
    @Html.ActionLink("返回", "Default")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
